Imports System.IO
Imports System
Imports System.Diagnostics
Imports System.Data
Imports System.Data.SqlClient
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Public Class frmUNLOCK
    Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogin.Click
        If txtPassword.Text = PublicVariable.Password Then
            Me.Close()
        Else
            SystemFunction.ShowMessageForm(PublicFunction.GetLanguageMessage("frmLogin.LoginFailed"), "")
        End If
    End Sub

    Private Sub UiButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UiButton1.Click, UiButton9.Click, UiButton7.Click, UiButton6.Click, UiButton5.Click, UiButton4.Click, UiButton3.Click, UiButton2.Click, UiButton11.Click, UiButton10.Click
        txtPassword.Focus()
        SendKeys.Send(CType(sender, Janus.Windows.EditControls.UIButton).Text)
    End Sub


    Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click
       txtPassword.Text = ""
    End Sub

    Private Sub btnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClose.Click
        Me.Close()
        Application.Exit()
    End Sub

    Private Sub frmUNLOCK_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
        Try
            GC.Collect()
            Me.Dispose()
        Catch ex As Exception

        End Try
    End Sub

    Private Sub frmUNLOCK_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
        If e.Alt = True And e.KeyCode = Keys.F4 Then
            e.Handled = True
            SystemFunction.ShowMessageForm("PLEASE INPUT PASSWORD TO CLOSE SCREEN!", "")
        End If
    End Sub

    Private Sub lblUser_DoubleClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblUser.DoubleClick

    End Sub
End Class
